package com.hnas.api.domain;

import java.util.HashMap;
import java.util.Map;
/**
 * 业务返回错误码
 * @author 吴斯音
 *
 */
public class ResultCode {
	public static final String SUCCESS = "00000";//返回结果成功
	public static final String FAIL = "00001";//返回结果失败
	public static final String ERRCODE_10000 = "10000";//系统未知异
	public static final String ERRCODE_10001 = "10001";//参数转换失败-请求参数异常
	public static final String ERRCODE_10002 = "10002";//参数错误
	public static final String ERRCODE_10003 = "10003";//查询返回对象为Null
	public static final String ERRCODE_30005 = "30005";//动态密钥和令牌不正确
	public static final String ERRCODE_30006 = "30006";//数据解密失败
	public static final String ERRCODE_50024 = "50024";//密码错误
	public static final String ERRCODE_50027 = "50027";//查询结果为空
//	public static final String ERRCODE_10004 = "10004";//返回结果数据异常
//	public static final String ERRCODE_10007 = "10007";//签名认证失败
//	public static final String ERRCODE_10008 = "10008";//APP无效
//	public static final String ERRCODE_10009 = "10009";//API请求发送数据为空
//	public static final String ERRCODE_10010 = "10010";//请求URL不存在
//	public static final String ERRCODE_10011 = "10011";//接口请求协议错误
//	public static final String ERRCODE_10012 = "10012";//返回数据格式不正确
//	public static final String ERRCODE_10013 = "10013";//加密方式不正确
//	public static final String ERRCODE_10014 = "10014";//传输令牌为空
	public static final String ERRCODE_6000 = "60000";//查询交易记录失败
	public static final String ERRCODE_60001 = "60001";//查询最新员工卡号失败,输入员工号为空
	public static final String ERRCODE_60002 = "60002";//查询交易记录失败
	public static final String ERRCODE_60003 = "60003";//查询交易记录失败
	
	public static Map<String, String> map = new HashMap<String, String>();
	static{
		map.put(SUCCESS, "处理成功");
		map.put(FAIL, "处理失败");
		map.put(ERRCODE_10000, "系统未知异");
		map.put(ERRCODE_10001, "参数转换失败-请求参数异常");
		map.put(ERRCODE_10002, "参数错误");
		map.put(ERRCODE_10003, "查询返回对象为Null");
		map.put(ERRCODE_50024, "密码错误");
		map.put(ERRCODE_50027, "查询结果为空");
		map.put(ERRCODE_6000, "查询交易记录失败");
//		map.put(ERRCODE_10004, "接口没有授权");
//		map.put(ERRCODE_10005, "动态密钥和令牌不正确");
//		map.put(ERRCODE_10006, "数据解密失败");
//		map.put(ERRCODE_10007, "签名认证失败");
//		map.put(ERRCODE_10008, "APP无效");
//		map.put(ERRCODE_10009, "API请求发送数据为空");
//		map.put(ERRCODE_10010, "请求URL不存在");
//		map.put(ERRCODE_10011, "接口请求协议错误");
//		map.put(ERRCODE_10012, "返回数据格式不正确");
//		map.put(ERRCODE_10013, "加密方式不正确");
//		map.put(ERRCODE_10014, "传输令牌为空");
		map.put(ERRCODE_60001, "查询最新员工卡号失败,输入员工号为空");
		map.put(ERRCODE_60002, "查询最新员工卡号,结果为空");
		map.put(ERRCODE_60003, "查询最新员工卡号失败,异常:");
	}

	public static String getErrMsg(String key){
		return map.get(key);
	}

	public static Map<String, String> getErrMsgMap(){
		return map;
	}
}
